package net.framework.smc.demo.dao;

import net.framework.smc.demo.po.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * @authore zyx
 * @date 2018/6/28 11:41
 */
//@Component
public interface UserJpa extends Serializable,JpaRepository<User, String>, JpaSpecificationExecutor<User> {

    @Query("select t from User t where t.userName = ?1 and t.delFlag=0 ")
    User findByUserName(String userName) throws Exception;

}
